package com.zhang.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class IndexController {

    @RequestMapping("/index")
    public ModelAndView index(ModelAndView modelAndView){
        modelAndView.addObject("title","传递的title");
        modelAndView.addObject("data","传递的数据");
        modelAndView.setViewName("index");

        return modelAndView;
    }
}




